using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._Raster._Conversion
{
    /// <summary>
    /// <para>Raster To TIN</para>
    /// <para>Converts a raster to a triangulated  irregular network (TIN) dataset.</para>
    /// <para>将栅格转换为三角化不规则网络 （TIN） 数据集。</para>
    /// </summary>    
    [DisplayName("Raster To TIN")]
    public class RasterTin : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public RasterTin()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_raster">
        /// <para>Input Raster</para>
        /// <para>The raster to process.</para>
        /// <para>要处理的栅格。</para>
        /// </param>
        /// <param name="_out_tin">
        /// <para>Output TIN</para>
        /// <para>The TIN dataset that will be generated.</para>
        /// <para>将生成的 TIN 数据集。</para>
        /// </param>
        public RasterTin(object _in_raster, object _out_tin)
        {
            this._in_raster = _in_raster;
            this._out_tin = _out_tin;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "Raster To TIN";

        public override string CallName => "3d.RasterTin";

        public override List<string> AcceptEnvironments => ["extent", "geographicTransformations", "outputCoordinateSystem", "scratchWorkspace", "tinSaveVersion", "workspace"];

        public override object[] ParameterInfo => [_in_raster, _out_tin, _z_tolerance, _max_points, _z_factor];

        /// <summary>
        /// <para>Input Raster</para>
        /// <para>The raster to process.</para>
        /// <para>要处理的栅格。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_raster { get; set; }


        /// <summary>
        /// <para>Output TIN</para>
        /// <para>The TIN dataset that will be generated.</para>
        /// <para>将生成的 TIN 数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output TIN")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_tin { get; set; }


        /// <summary>
        /// <para>Z Tolerance</para>
        /// <para>The maximum allowable difference in (z units) between the height of the input raster and the height of the output TIN. By default, the z tolerance is 1/10 of the z range of the input raster.</para>
        /// <para>输入栅格高度与输出 TIN 高度之间的最大允许差值（z 单位）。默认情况下，z 容差为输入栅格 z 范围的 1/10。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Z Tolerance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _z_tolerance { get; set; } = null;


        /// <summary>
        /// <para>Maximum Number of Points</para>
        /// <para>The maximum number of points that will be added to the TIN before the process is terminated. By default, the process will continue until all the points are added.</para>
        /// <para>在进程终止之前将添加到 TIN 的最大点数。默认情况下，该过程将继续进行，直到添加所有点。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Number of Points")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _max_points { get; set; } = 1500000;


        /// <summary>
        /// <para>Z Factor</para>
        /// <para>The factor that the height values of the raster will be multiplied by in the resulting TIN dataset. This is typically used to convert Z units to match XY units.</para>
        /// <para>在生成的 TIN 数据集中，栅格的高度值将乘以的因子。这通常用于转换 Z 单位以匹配 XY 单位。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Z Factor")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _z_factor { get; set; } = 1;


        public RasterTin SetEnv(object extent = null, object geographicTransformations = null, object outputCoordinateSystem = null, object scratchWorkspace = null, object tinSaveVersion = null, object workspace = null)
        {
            base.SetEnv(extent: extent, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, scratchWorkspace: scratchWorkspace, tinSaveVersion: tinSaveVersion, workspace: workspace);
            return this;
        }

    }

}